<?php 
namespace app\seller\validate;
use think\validate;
class ShippingAreaValidate extends Validate{
    //验证规则
    protected $rule = array(
		'shipping_area_name' => 'max:150',
		'shipping_code' => 'max:50',
		'shop_id'=>'number',
    	);
    //验证失败提示信息
    protected $message = array(
		'shipping_area_name.max'=>'配送区域名称的值不能超过150个字符',
		'shipping_code.max'=>'物流id的值不能超过50个字符',
		'shop_id.number'=>'店铺ID的值必须是一个整数',
);
    //验证场景
    protected $scene = array(
		'add'=>array('shipping_area_name','shipping_code','shop_id','config','is_default'),
		'edit'=>array('shipping_area_id','shipping_area_name','shipping_code','shop_id','config','is_default'),
	);

}